'use strict';

var packageJson = require('./package.json')

module.exports = function(grunt) {

  // Load the plugin that provides the "uglify" task.
  // grunt.loadNpmTasks('grunt-browserify');
  // grunt.loadNpmTasks('grunt-sass');
  // grunt.loadNpmTasks('grunt-env');
  // grunt.loadNpmTasks('grunt-electron');
  // grunt.loadNpmTasks('grunt-contrib-watch');
  // grunt.loadNpmTasks('grunt-contrib-clean');

  grunt.loadNpmTasks('grunt-electron-installer')

  // Project configuration.
  grunt.initConfig({
    // pkg: grunt.file.readJSON('./package.json'),
    'create-windows-installer': {
      x64: {
        appDirectory: './build/SealTalk-win32-x64',
        outputDirectory: './dist2',
        authors: packageJson.author,
        exe: '首钢股份.exe',
        // iconUrl : 'res/app.ico'
        setupIcon : './res/app.ico'
      },
      ia32: {
        appDirectory: './build/SealTalk-win32-ia32',
        outputDirectory: './dist2',
        authors: packageJson.author,
        exe: '首钢股份.exe',
        iconUrl : 'res/app.ico',
        setupIcon : 'res/app.ico'
      }
    }
  });

  // Default task(s).
  // grunt.registerTask('default', ['env:dev' ,'browserify:dev', 'sass:dev', 'watch']);
  // grunt.registerTask('build', ['build-osx']);
  // grunt.registerTask('build-osx', ['env:dist', 'clean:dist', 'electron:osx']);

  grunt.registerTask('installer-win64', ['create-windows-installer:x64']);
};
